package com.yh.csx.crm.core.enums;

import lombok.AllArgsConstructor;

/**
 * @author Huang Zhaoping
 * @date 2019/3/1
 */
@AllArgsConstructor
public enum PositionEnum {
    SALES("销售员"),
    SALES_SUPPORT("销售支持"),
    SALES_MANAGER("销售主管"),
    AREA_MANAGER("区域经理"),
    PLATFORM("平台业务"),
    FINANCE_STAFF("财务人员"),
    FINANCE_MANAGER("财务总监"),
    CEO("CEO")
    ;
    String name;

    public String getName() {
        return name;
    }

    public static PositionEnum resolve(String position) {
        try {
            return PositionEnum.valueOf(position);
        } catch (Exception e) {
            return null;
        }
    }

    public static String resolveName(String position) {
        try {
            return PositionEnum.valueOf(position).getName();
        } catch (Exception e) {
            return "";
        }
    }
}
